import React,{Component} from 'react'
import {
    Platform,
    StyleSheet,
    View,
    Text,
    Modal,
    ProgressBarAndroid,
} from 'react-native';

export default class Loading extends Component{
    render(){
        return (
            <Modal transparent={true} visible={this.props.visible} onRequestClose={this.props.requestClose}>
                <View style={styles.parent}>
                    <View style={styles.content}>
                        <ProgressBarAndroid styleAttr='Inverse' color='#FF0000' />
                        <Text style={styles.noticeText}>
                            {this.props.notice}
                        </Text>
                    </View>
                    
                </View>
            </Modal>
        )
    }
}
const  styles ={

    parent:{
        flex:1,
        backgroundColor: 'rgba(0, 0, 0, 0.3)',
        justifyContent:'center',
    },
    content:{
        alignSelf:'center',        
        justifyContent: 'center',
        // flexDirection: 'row',
        backgroundColor: '#fff',
        borderWidth:1,
        borderColor:'rgb(245,245,245)',
        borderRadius: 10,
        width:180,
        height:130,
    },
    noticeText:{
        marginTop:10,
        alignSelf: 'center',
        // fontSize:
    },
}